/*
 * @Author: chen haoxuan
 * @Date: 2021-06-04 23:06:31
 * @LastEditTime: 2021-06-04 23:07:40
 */
#include<iostream>
#include<string>
using namespace std;
class Studnet
{
  public:
    void get_value()
    {
      cout<<"Please enter num, name, sex: "<<endl;
      cin>>num>>name>>sex;
    }
    void display()
    {
      cout<<"num: "<<num<<endl;
      cout<<"name: "<<name<<endl;
      cout<<"sex: "<<sex<<endl;
    }
  private:
    int num;
    string name;
    char sex;
};
class Student1:private Studnet
{
  public:
    void get_value1()
    {
      get_value();
      cout<<"Please enter age, address: "<<endl;
      cin>>age>>addr;
    }
    void display1()
    {
      display();
      cout<<"age: "<<age<<endl;
      cout<<"addr: "<<addr<<endl;
    }
  private:
    int age;
    string addr;
};
int main()
{
  Student1 stud1;
  stud1.get_value1();
  stud1.display1();
  system("pause");
  return 0;
}